<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:ui="http://java.sun.com/jsf/facelets">

<h:head>
	<title>Nuovo Pachetto Predefinito</title>
</h:head>
<h:body>
#{PackBean.resettaPachetto()}
	<h:form>
		<p:panel header="Crea Pacchetto Form">
		 
			<h:panelGrid id="grid" columns="4" cellpadding="5"> 
			
			 	<h:outputLabel for="nome" value="Nome Pacchetto: " /> 
			 	<p:inputText id="nome" value="#{PackBean.pack.nome}" required="true" label="Nome"/>
			 	<p:message for="nome" />
			 	<h:outputText value="" />
			 		
			 	<h:outputLabel for="descrizione" value="Descrizione: "/>
			 	<p:inputTextarea rows="10" cols="50" id="descrizione" value="#{PackBean.pack.descrizione}" required="true" label="Descrizione">
					<f:validateLength minimum="5" /> 
				</p:inputTextarea>
				<p:message for="descrizione" />
				<h:outputText value="" />
						
				<h:outputLabel for="numero" value="Giornate: "/>
				<p:inputText id="numero" value="#{PackBean.giornate}" required="true" label="Giornate">
					<f:validateDoubleRange minimum="2" maximum="30" />  
				</p:inputText>
				<p:message for="numero" />
				<h:outputText value="" />		
			</h:panelGrid>
			
	
			<p:commandButton update="grid" icon="ui-icon-check" validateClient="true" style="margin-right:10px"
				value="Avanti" action="#{PackBean.passo1()}"/>
		</p:panel>
	</h:form>
</h:body>
</html>